package com.zhaowb.springcloud.common.msg;

import java.util.List;

/**
 * Created with IDEA
 *
 * @author zhaowb
 * @date 2018/10/22 19:53
 */
public class TableResultResponse<T> {
    private int total;
    private List<T> rows;

    public TableResultResponse() {
    }

    public TableResultResponse(int total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }

    public TableResultResponse(Long total, List<T> rows) {
        this.total = total.intValue();
        this.rows = rows;
    }

    TableResultResponse<T> total(int total) {
        this.total = total;
        return this;
    }

    TableResultResponse<T> total(List<T> rows) {
        this.rows = rows;
        return this;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<T> getRows() {
        return rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }
}
